package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzXiaoquMapper;
import com.ruoyi.system.domain.DzXiaoqu;
import com.ruoyi.system.service.IDzXiaoquService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 楼盘小区Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-16
 */
@Service
public class DzXiaoquServiceImpl implements IDzXiaoquService 
{
    @Autowired
    private DzXiaoquMapper dzXiaoquMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询楼盘小区
     * 
     * @param xqId 楼盘小区主键
     * @return 楼盘小区
     */
    @Override
    public DzXiaoqu selectDzXiaoquByXqId(Long xqId)
    {
        return dzXiaoquMapper.selectDzXiaoquByXqId(xqId);
    }

    /**
     * 查询楼盘小区列表
     * 
     * @param dzXiaoqu 楼盘小区
     * @return 楼盘小区
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzXiaoqu> selectDzXiaoquList(DzXiaoqu dzXiaoqu)
    {

        //权限控制
        return dzXiaoquMapper.selectDzXiaoquList(dzXiaoqu);
    }

    @Override
    public List<DzXiaoqu> selectDzXiaoquListWeb(DzXiaoqu dzXiaoqu)
    {
        return dzXiaoquMapper.selectDzXiaoquList(dzXiaoqu);
    }

    /**
     * 新增楼盘小区
     * 
     * @param dzXiaoqu 楼盘小区
     * @return 结果
     */
    @Override
    public int insertDzXiaoqu(DzXiaoqu dzXiaoqu)
    {
        return dzXiaoquMapper.insertDzXiaoqu(dzXiaoqu);
    }

    /**
     * 修改楼盘小区
     * 
     * @param dzXiaoqu 楼盘小区
     * @return 结果
     */
    @Override
    public int updateDzXiaoqu(DzXiaoqu dzXiaoqu)
    {
        return dzXiaoquMapper.updateDzXiaoqu(dzXiaoqu);
    }

    /**
     * 批量删除楼盘小区
     * 
     * @param xqIds 需要删除的楼盘小区主键
     * @return 结果
     */
    @Override
    public int deleteDzXiaoquByXqIds(Long[] xqIds)
    {
        return dzXiaoquMapper.deleteDzXiaoquByXqIds(xqIds);
    }

    /**
     * 删除楼盘小区信息
     * 
     * @param xqId 楼盘小区主键
     * @return 结果
     */
    @Override
    public int deleteDzXiaoquByXqId(Long xqId)
    {
        return dzXiaoquMapper.deleteDzXiaoquByXqId(xqId);
    }
}
